~ chicken-core (master) /manual/Module (scheme read)
Trap1[[tags: manual]]2[[toc:]]34== Module (scheme read)56<procedure>(read [port])</procedure>78If port is omitted from {{read}}, it defaults to the value returned by9(current-input-port). It is an error to attempt an input operation on a closed10port.1112The read procedure converts external representations of Scheme objects into the13objects themselves. That is, it is a parser for the non-terminal <datum>.14It returns the next object parsable from the given15textual input port, updating16port to point to the first character past the end of the external17representation of the object.1819If an end of file is encountered in the input before any characters are found20that can begin an object, then an end-of-file object is returned. The port21remains open, and further attempts to read will also return an end-of-file22object. If an end of file is encountered after the beginning of an object’s23external representation, but the external representation is incomplete and24therefore not parsable, an error that satisfies read-error? is signaled.2526---27Previous: [[Module (scheme process-context)]]2829Next: [[Module (scheme repl)]]